<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script type="text/javascript">
         let arr1 = [1,3,5,34234,4,56,367,788];
         let temp;
         for(let i = 0;i<arr1.length;i++){
         	for(let j = 0;j<arr1.length-1-i;j++){
               if(arr1[j]>arr1[j+1]){
                    temp = arr1[j];
			        arr1[j] = arr1[j+1];
			        arr1[j+1] = temp;
               }
         	}
         }
         console.log(arr1)
        
	</script>
</body>
</html>